package com.tyk.bookstore.back.payment.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tyk.bookstore.back.payment.model.enume.AmountLogType;
import com.tyk.bookstore.back.payment.model.enume.StatementNature;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author tyk
 * @description 系统余额变更日志
 */
@Schema(name = "AmountLogDo", description = "系统余额变更日志")
@Data
@TableName("amount_log")
public class AmountLogDo implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "id")
    private Long id;

    @Schema(description = "会员ID")
    @TableField("member_id")
    private Long memberId;

    @Schema(description = "变更值")
    @TableField("modification")
    private BigDecimal modification;

    @Schema(description = "来源标识")
    @TableField("source_identification")
    private Long sourceIdentification;

    @Schema(description = "交易性质[0收入,1支出]")
    @TableField("nature")
    private StatementNature nature;

    @Schema(description = "变更类型[0充值,1订单支付]")
    @TableField("type")
    private AmountLogType type;

    @Schema(description = "记录时间")
    @TableField("create_time")
    private LocalDateTime createTime;
}
